package com.hmall.cart.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author Mr.M
 * @version 1.0
 * @description TODO
 * @date 2024/10/9 20:24
 */
@Configuration
public class RemoteCallConfig {

 //定义bean，创建RestTemplate实例
 @Bean
 @LoadBalanced
 public RestTemplate restTemplate(){
  return new RestTemplate();
 }


}
